﻿#ifndef USERREGISTERCODEC_REGISTER_H
#define USERREGISTERCODEC_REGISTER_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "UserRegisterCodecBase.h"

#include "LogSaver.h"

class Mapper_User;
class RegisterCenter_User;
class UserRegisterCodec_Register : public QObject,public ObjAutoInject,public UserRegisterCodecBase
{
  Q_OBJECT
private:
  uchar userNameFlag=0xff;
  uchar passwordFlag=0xfe;
private://dependency
  Mapper_User* mapper_User=Q_NULLPTR;
  RegisterCenter_User* registerCenter_User=Q_NULLPTR;
  LogSaver* logSaver=LogSaver::getLogSaver();
public:
  explicit UserRegisterCodec_Register();
  virtual ~UserRegisterCodec_Register();
signals:
public:
  virtual DataPackage_UserRegisterCodec* decode(DataPackage_UserRegisterCodec* dataPackage_UserRegisterCodec)override;
public://geter and seter
  Mapper_User* getMapper_User()const;
  UserRegisterCodec_Register* setMapper_User(Mapper_User* const mapper_User);
  RegisterCenter_User* getRegisterCenter_User()const;
  UserRegisterCodec_Register* setRegisterCenter_User(RegisterCenter_User* const registerCenter_User);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // USERREGISTERCODEC_REGISTER_H
